package com.cheetah.start.common.shoesImg;

import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.imgcodecs.Imgcodecs;

import java.util.List;

public class TestCompare {


    public static void main(String[] args) {
        //// 1. 加载带有绿色轮廓的图片
        //Mat image = Imgcodecs.imread("image_with_green_contours.jpg");
        //
        //// 2. 提取绿色轮廓
        //List<MatOfPoint> greenContours = ContourSimilarityProcessor.extractGreenContours(image);
        //
        //if (greenContours.isEmpty()) {
        //    System.out.println("未找到绿色轮廓！");
        //    return;
        //}
        //
        //// 3. 处理轮廓并计算相似度
        //SimilarityAnalysisResult result = ContourSimilarityProcessor.processContours(image, greenContours);
        //
        //// 4. 可视化结果
        //Mat resultImage = ResultVisualizer.visualizeSimilarityResults(image, greenContours, result.similarityMatrices);
        //Imgcodecs.imwrite("similarity_result.jpg", resultImage);
        //
        //// 5. 生成详细报告
        //ResultVisualizer.generateSimilarityReport(result.similarityMatrices, greenContours);
        //
        //System.out.println("\n处理完成！结果已保存为 similarity_result.jpg");
        //System.out.println("轮廓编号对应关系已在上图中标注");
    }
}
